<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>select</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : April 1993</div>
    <p>
      <b>select</b> -  select keyword</p>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <pre>

 select expr,
   case expr1 then instructions1,
   case expr2 then instructions2,
   ...
   case exprn then instructionsn,
   [else instructions],
 end
   
    </pre>
    <p></p>
    <p>
    Notes:
  </p>
    <dl>
      <dd>
        <b>-</b>The only constraint is that each "then"  keyword  must be on  the same line line as corresponding "case" keyword.</dd>
      <dd>
        <b>-</b>The keyword "then"  can be replaced by a carriage return or a comma.   <tt>
          <b>instructions1</b>
        </tt> are executed if <tt>
          <b>expr1=expr</b>
        </tt>, etc.</dd>
    </dl>
    <p>
    Warning: the number of characters used to define the body of any
    conditionnal instruction (if while for or select/case) must be limited to
    16k.</p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

while %t do
  n=round(10*rand(1,1))
  select n
  case 0 then 
    disp(0)
  case 1 then
    disp(1)
  else
    break
  end
end
  
 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="if.htm">
        <tt>
          <b>if</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="while.htm">
        <tt>
          <b>while</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="for.htm">
        <tt>
          <b>for</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
  </body>
</html>
